﻿namespace MetaVideoEditorEvolved.Converter
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows.Data;
    using MetaVideoEditorEvolved.Entity;

    public class ActionStatusImageConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var status = (ActionStatus)value;

            switch (status)
            {
                case ActionStatus.Uknown:
                    return "/MetaVideoEditorEvolved;component/Images/waiting.png";

                case ActionStatus.Waiting:
                    return "/MetaVideoEditorEvolved;component/Images/waiting.png";

                case ActionStatus.Success:
                    return "/MetaVideoEditorEvolved;component/Images/success.png";

                case ActionStatus.Error:
                    return "/MetaVideoEditorEvolved;component/Images/error.png";

                case ActionStatus.InProgress:
                    return "/MetaVideoEditorEvolved;component/Images/waiting.png";

                default:
                    return "/MetaVideoEditorEvolved;component/Images/waiting.png";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
